Component({
  properties: {
    mch: Object,
    goods_id: String
  },
  data: {

  },
  methods: {
    FollwClick(e) {
      var follw = e.currentTarget.dataset.follw
      if (follw == 0) {
        follw = 1
      } else {
        follw = 0
      }
      var _this = this
      wx.showLoading({
        type: "loading..."
      })
      getApp().request({
        url: getApp().api.auction.follow,
        method: "GET",
        data: {
          mch_id: _this.data.mch.mch_id,
          status: follw,
        },
        success(res) {
          wx.hideLoading()
          _this.setData({
            ['mch.is_follow']: follw
          })
        }
      })
    },
    clickskip(e){
      var id = e.currentTarget.dataset.id;
      if (id && id > 0) {
        wx.navigateTo({
          url: '/mch/shop/shop?id=' + id,
        })
      }
    }
  }
})